package us.icitap.cm.business.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.eclipse.persistence.annotations.Customizer;

import us.icitap.cm.utils.MyCustomizer;

@Entity
@Customizer(MyCustomizer.class)
@Table(name="ACTUAL_SITUATION", schema="MPC")
@TableGenerator(name="ACTUAL_SITUATION_IDS",table="AUTO_IDS",valueColumnName="LAST_ID",initialValue=1, allocationSize=1,schema="MPC")
public class ActualSituation extends BaseEntity implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3476294643125167890L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator="ACTUAL_SITUATION_IDS")
	private Integer id;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ActualSituation other = (ActualSituation) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
}
